check process elasticsearch
with pidfile /var/run/elasticsearch/elasticsearch.pid
  start program = "/usr/lib/elasticsearch/bin/elasticsearch -p /var/run/elasticsearch/elasticsearch.pid" as uid <%= @owner %> with timeout 90 seconds
  stop program = "/bin/bash -c '/bin/kill `cat /var/run/elasticsearch/elasticsearch.pid`'" with timeout 90 seconds
  group elasticsearch
  if failed
    port 9200
    protocol http
    request "/_cat/health"
  then restart
